﻿using System.Web.Services;
using System.Web.Services.Protocols;
using Nomad.WebSync.Service.DAO;

namespace Nomad.WebSync.Service {
    public partial class Desktop {
        /// <summary>
        /// Get a list with all contact data from current user
        /// </summary>
        /// <returns>Array of Contact with all contacts data from current user</returns>        
        [SoapHeader("Header"), WebMethod(Description = "Get a list with all contact data from current user")]
        public Contact[] GetContacts() {
            this.Authentication();
            return Contact.ListByAccount(Header.Username);
        }
    }
}
